package com.sskj.wallet.presenter;

import android.os.MessageQueue;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.wallet.bean.WalletDetailBean;
import com.sskj.wallet.ui.fragment.WalletFragment;


/**
 * @author Hey
 * Create at  2019/06/26
 */
public class WalletPresenter extends BasePresenter<WalletFragment> {
    public void getWalletDetail(int walletType) {
        httpService.getWalletDetail(walletType)
                .tag(this)
                .execute(new JsonCallBack<HttpData<WalletDetailBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<WalletDetailBean>> response) {
                        mView.getWalletDetailOK(response.body().getData());
                    }

                    @Override
                    public void onFinish() {
                        mView.stopRefresh();
                    }
                });
    }

}
